#include <iostream>
using std::cout;
using std::endl;

class Base {
public:
	Base(long x = 0)
    : _base(x)
    { 
        cout << "Base(long)" << endl;
    }

    ~Base(){
        cout << "~Base()" << endl;
    }

    void display() const{
        cout << "Base:" << _base << endl;
    }

    long _data = 10;
private:
	long _base;
};

class Derived
: public Base 
{
public:
	Derived(long base,long derived)
    : Base(base)
	, _derived(derived)
	{ 
        cout << "Derived(long,long)" << endl; 
    }

    ~Derived(){
        cout << "~Derived()" << endl;
    }

    void print(){
        cout << _data << endl;
    }

    void display() const{
        cout << "Derived:" << _derived << endl;
    }

    char _data = 'a';
private:
	long _derived;
};

void test0(){
    cout << sizeof(Derived) << endl;
    Derived d1(2,4);
    d1.print();
    cout << d1._data << endl;
    cout << d1.Base::_data << endl;
}

void test1(){
    Derived d1(3,7);
    d1.display();
    d1.Base::display();

}

int main(void){
    test1();
    return 0;
}
